package com.itheima.demo.demo9;
public class DiGui {
    public static void main(String[] args) {
        int method = method(2);
        System.out.println(method);
    }
    private static int method(int n) {
        if(n==1){
            return 1;
        }
        return n+method(n-1)-1;
    }
}
